﻿using System.Threading.Tasks;

namespace Athena.Transport.Implementations
{
    using Message;
    public class TransportMessageListener : ITransportMessageListener
    {

        public event ReceivedDelegate Received;

        public async Task OnReceived(ITransportMessageSender transportMessageSender, RpcTransportMessage rpcTransportMessage)
        {
            if (Received == null)
            {
                return;
            }
            await Received(transportMessageSender, rpcTransportMessage);
        }

    }
}
